package com.zbkj.crmeb.enums;

import com.fasterxml.jackson.annotation.JsonCreator;

/**
 * 退款状态
 *
 */
public enum RefundStatusEnum {

    NOT_REFUND(0, "未退款"),

    SHIPPED_APPLYING(1, "申请中"),

    REFUND_SUCCESS(2, "退货退款"),

    MAKE_REFUND(3, "补偿性退款");

    private final Integer code;
    private final String msg;

    RefundStatusEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }


    @JsonCreator
    public static RefundStatusEnum valueOf(Integer code) {
        for (RefundStatusEnum value : values()) {
            if (code.equals(value.getCode())) {
                return value;
            }
        }
        return RefundStatusEnum.NOT_REFUND;
    }

}

